<template>
  <div>
    <div class="successPay">
      <img src="../../assets/successPay.png" alt="" width="100" style="margin-top:50px;">
      <div style="font-size: 20px;">支付成功</div>
      <div style="color: #999;margin-top:20px;">恭喜您成功购买{{detail.name}}</div>
    </div>
    <div style="margin-top:20px;text-align: center">
      <!-- <span class="btnColor" @click="$router.push({path:'/main/order'})">查看订单</span>
      <span style="width:30px;display: inline-block;"></span> -->
      <span class="btnColor backBtn" @click="$router.push({path:'/main/home'})">返回首页</span>
    </div>
  </div>
</template>
<script>
  import http from '../../service/http.js'
  export default {
    components: {

    },
    data() {
      return {
        id: "",
        detail: ""
      }
    },
    mounted() {
      this.id = this.$route.query.pid;
      this.getDetail();
    },
    methods: {
      getDetail() {
        http.get("/product/detail?pid=" + this.id).then((res) => {
          if (res.status == 200) {
            this.detail = res.data.body;
          }
        })
      }
    }
  }
</script>
<style lang="less" scoped>
  .successPay {
    text-align: center;
  }

  .btnColor {
    width: 110px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #ccc;
  }

  .backBtn {
    background: #f6f6f6;
    color: #999 !important;
  }
</style>